<?php

session_start();

?>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>E-Groupware sisfor</title>
<meta name="description" content="Medical website">
<link href="css/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style5 {color: #DEDEDE}
.style6 {color: #FFFF00}
-->
</style>
</head>

<body>
<table width="750" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#000000">
  <tr>
    <td><img src="images/logo.jpg" width="750" height="204"></td>
  </tr>
  
  <tr>
    <td height="100%"><table width="750" height="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="100%" valign="top"><table width="490" height="420" border="1">
          <tr>
            <td width="106" height="179"><p>
			
              <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22">
                <param name="movie" value="button12.swf">
                <param name="quality" value="high">
                <embed src="button12.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="22" ></embed>
              </object>
            </p>
              <p>
                <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22" title="PROFIL">
                  <param name="BGCOLOR" value="">
                  <param name="movie" value="button3.swf">
                  <param name="quality" value="high">
                  <embed src="button3.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="22" ></embed>
                </object>
</p>
              <p>
                <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22">
                  <param name="movie" value="button9.swf">
                  <param name="quality" value="high">
                  <embed src="button9.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="22" ></embed>
                </object>
              </p>
              <p>
                <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22">
                  <param name="movie" value="button10.swf">
                  <param name="quality" value="high">
                  <embed src="button10.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="22" ></embed>
                </object>
              </p>
              <p>
                <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22">
                  <param name="BGCOLOR" value="">
                  <param name="movie" value="button7.swf">
                  <param name="quality" value="high">
                  <embed src="button7.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="22" ></embed>
                </object>
              </p>
			   <p align="center">
			  <a href="logout.php">Logout</a>
			  
			  <?php
			  
	include "koneksi.php";
	$sql=mysql_query ("SELECT `user`, `pass`, `email`, `nrp` FROM `signup` where `id` = 1");
	while ($baris=mysql_fetch_array($sql)){?>
	
	

            <td width="368"><table width="50" align="center">
              <tr>
                <th scope="row"> <span class="style6">My Account</span>
                  <form id="form2" name="form2" method="post" action="">
                      <table width="401">
                        <tr>
                          <td width="165" class="text2 style6">USERNAME</td>
                          <td width="12">:</td>
                          <td width="202"><label>
                            <input name="a" type="text" class="field" id="a" value="<?php echo $_SESSION['usernamess']; ?>"/>
                          </label></td>
                        </tr>
                        <tr>
                          <td class="text2 style6">PASSWORD</td>
                          <td>:</td>
                          <td><input name="b" type="text" class="field" id="b" value="<?php echo $_SESSION['passss'] ?>"></td>
                        </tr>
                        <tr>
                          <td class="text2 style6">E-MAIL</td>
                          <td>:</td>
                          <td><input name="c" type="text" class="field" id="c" value="<?php echo $_SESSION['emailss']; ?>"></td>
                        </tr>
                        <tr>
                          <td class="text2 style6">NRP</td>
                          <td>:</td>
                          <td><input name="d" type="text" class="field" id="d" value="<?php echo $_SESSION['nrpss']; ?>"></td>
                        </tr>

                        <tr>
                          <td><span class="style6"></span></td>
                          <td>&nbsp;</td>
                          <td><label>
                            <input type="submit" name="edit" value="EDIT" />
                          </label></td>
                        </tr>
                      </table>
                  </form>
				  <?php
	}?>
                  <?
	if (isset($_POST['edit']))
  	{
  		include "koneksi.php";
		$a=$_POST['a'];
		$b=$_POST['b'];
		$c=$_POST['c'];
		$d=$_POST['d'];
		$up="UPDATE signup SET user='$a',pass='$b',email='$c',nrp='$d'";
  		$rs=mysql_query($up);
		$str="data berhasil diubah";
		echo "<script> alert('$str');</script>";
		echo "<meta http-equiv=refresh content=0;url=profil.php>";
	}
	
	
?>    
        </th>
              </tr>
            </table></td>
          </tr>
        </table></td>
        <td width="262" height="100%" valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td class="r-title"> </td>
          </tr>
          <tr>
            <td width="261" height="100%" bgcolor="#666666" class="r-cont"><p align="center">&nbsp;</p>
			</p>
              <p align="center">              </p>
              <p align="center" class="style5"><?php
include'clock.php';
?>
<?php
include'cal.php';
?></p>
              <p align="center" class="style5">&nbsp;</p></td>
          </tr>
        </table>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="1" bgcolor="#b3b5a8" class="bottom-menu">&nbsp;</td>
  </tr>
  <tr>
    <td height="1" class="bottom_addr">&nbsp;</td>
  </tr>
</table>

</body>
</html>
